package data.nanjing.expo.models.domain.exhibition;

import com.fasterxml.jackson.annotation.JsonFormat;
import data.nanjing.expo.common.DateTimeUtil;
import data.nanjing.expo.common.Util;

import java.util.Date;

/**
 * 展览中心
 *
 * @author ChanJi
 * @create 2018-06-24 12:51
 **/
public class Exhibition {
    private Integer id;
    /**
     * 展览名称
     */
    private String expoName;
    /**
     * 城市
     */
    private String city;
    /**
     * 开始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone="GMT+8")
    private Date startTime;
    /**
     * 结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone="GMT+8")
    private Date endTime;
    /**
     * 展会橱窗图
     */
    private String expoImg;
    /**
     * 删除状态:yes：删除，no:不删除
     */
    private String delStatus;
    /**
     * 用户操作状态,cancel：取消,normal:正常
     */
    private String userStatus;
    /**
     *管理员审核状态，通过：approve，未审核;disapprove,删除：delete
     */
    private String adminStatus;
    /**
     * 是否在首页显示，yes：显示,no:不显示
     */
    private String indexShow;

    private Integer userId;

    /**
     * 创建时间
     * gmt_create
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date createTime;
    /**
     * 上次更新时间
     * gmt_modified
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date  updateTime;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getExpoName() {
        return expoName;
    }

    public void setExpoName(String expoName) {
        this.expoName = expoName;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getStartTime() {
        return DateTimeUtil.dateFormat(startTime,DateTimeUtil.DAY_PATTERN);
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public String getExpoImg() {

        return Util.getFinalFilePath(expoImg,"480","293");
    }

    public void setExpoImg(String expoImg) {
        this.expoImg = expoImg;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public String getDelStatus() {
        return delStatus;
    }

    public void setDelStatus(String delStatus) {
        this.delStatus = delStatus;
    }

    public String getUserStatus() {
        return userStatus;
    }

    public void setUserStatus(String userStatus) {
        this.userStatus = userStatus;
    }

    public String getAdminStatus() {
        return adminStatus;
    }

    public void setAdminStatus(String adminStatus) {
        this.adminStatus = adminStatus;
    }

    public String getIndexShow() {
        return indexShow;
    }

    public void setIndexShow(String indexShow) {
        this.indexShow = indexShow;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    @Override
    public String toString() {
        return "Exhibition{" +
                "id=" + id +
                ", expoName='" + expoName + '\'' +
                ", city='" + city + '\'' +
                ", startTime=" + startTime +
                ", endTime=" + endTime +
                ", expoImg='" + expoImg + '\'' +
                ", delStatus='" + delStatus + '\'' +
                ", userStatus='" + userStatus + '\'' +
                ", adminStatus='" + adminStatus + '\'' +
                ", indexShow='" + indexShow + '\'' +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                '}';
    }
}
